package com.zk.code.net;

import org.xutils.common.Callback;
import org.xutils.http.RequestParams;
import org.xutils.x;

import java.io.File;

/**
 * Created by Administrator on 2018/9/14.
 */
public class HttpUtil {
    public static void postData(RequestParams params, Callback.CommonCallback<String> commonCallback){
        Callback.Cancelable cancleable = x.http().post(params, commonCallback);
    }
    public static void getData(RequestParams params, Callback.CommonCallback<String> callback){
        Callback.Cancelable cancleable = x.http().get(params, callback);
    }

    public static void postDataProgress(RequestParams params, Callback.ProgressCallback<File> progressCallback){
        Callback.Cancelable cancleable = x.http().post(params,progressCallback);
    }
}
